<template>
	<view>
		<sun-login v-if="!userinfo.code_response.openid"></sun-login>
		<sun-userinfo v-else></sun-userinfo>
	</view>
</template>

<script>
	import {
		mapMutations,
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				my_show: false
			};
		},
		computed: {
			...mapState('m_user', ['userinfo'])
		},
		watch: {
			'userinfo.code_response.openid': function(val) {
				if(!val) {
					this.my_show = false
				} else {
					this.my_show = true
				}
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">

</style>
